package org.snia.cdmi.model;


public enum StoreClass {
	
    Zip("zip"),
    Part("Part"),
    File("file"),
    Encrypt("encrypt");
    /************************************/
    /** 每个Slice文件的最头一排 为引用值 **/
    /************************************/
    public static StoreClass fromValue(String StorageClassString) throws IllegalArgumentException {
        for (StoreClass storageClass : StoreClass.values()) {
            if (storageClass.toString().equalsIgnoreCase(StorageClassString)) return storageClass;
        }

        throw new IllegalArgumentException(
                "Cannot create enum from " + StorageClassString + " value!");
    }


    private final String storageClassId;

    private StoreClass(String id) {
        this.storageClassId = id;
    }

    /* (non-Javadoc)
     * @see java.lang.Enum#toString()
     */
    @Override
    public String toString() {
        return storageClassId;
    }
}
